# 0 "flash_TC4xx.c"
# 1 "/home/dummy/share/HOST/AURIX_MINGW_INSTALL/DAS_v8_0_5_Linux.tar/aurix_flasher_linux/gdb_flash_drivers//"
# 0 "<built-in>"
#define __STDC__ 1
# 0 "<built-in>"
#define __STDC_VERSION__ 201710L
# 0 "<built-in>"
#define __STDC_UTF_16__ 1
# 0 "<built-in>"
#define __STDC_UTF_32__ 1
# 0 "<built-in>"
#define __STDC_HOSTED__ 1
# 0 "<built-in>"
#define __GNUC__ 11
# 0 "<built-in>"
#define __GNUC_MINOR__ 3
# 0 "<built-in>"
#define __GNUC_PATCHLEVEL__ 1
# 0 "<built-in>"
#define __VERSION__ "11.3.1 20221230"
# 0 "<built-in>"
#define __ATOMIC_RELAXED 0
# 0 "<built-in>"
#define __ATOMIC_SEQ_CST 5
# 0 "<built-in>"
#define __ATOMIC_ACQUIRE 2
# 0 "<built-in>"
#define __ATOMIC_RELEASE 3
# 0 "<built-in>"
#define __ATOMIC_ACQ_REL 4
# 0 "<built-in>"
#define __ATOMIC_CONSUME 1
# 0 "<built-in>"
#define __OPTIMIZE__ 1
# 0 "<built-in>"
#define __FINITE_MATH_ONLY__ 0
# 0 "<built-in>"
#define __SIZEOF_INT__ 4
# 0 "<built-in>"
#define __SIZEOF_LONG__ 4
# 0 "<built-in>"
#define __SIZEOF_LONG_LONG__ 8
# 0 "<built-in>"
#define __SIZEOF_SHORT__ 2
# 0 "<built-in>"
#define __SIZEOF_FLOAT__ 4
# 0 "<built-in>"
#define __SIZEOF_DOUBLE__ 8
# 0 "<built-in>"
#define __SIZEOF_LONG_DOUBLE__ 8
# 0 "<built-in>"
#define __SIZEOF_SIZE_T__ 4
# 0 "<built-in>"
#define __CHAR_BIT__ 8
# 0 "<built-in>"
#define __BIGGEST_ALIGNMENT__ 4
# 0 "<built-in>"
#define __ORDER_LITTLE_ENDIAN__ 1234
# 0 "<built-in>"
#define __ORDER_BIG_ENDIAN__ 4321
# 0 "<built-in>"
#define __ORDER_PDP_ENDIAN__ 3412
# 0 "<built-in>"
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
# 0 "<built-in>"
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
# 0 "<built-in>"
#define __SIZEOF_POINTER__ 4
# 0 "<built-in>"
#define __GNUC_EXECUTION_CHARSET_NAME "UTF-8"
# 0 "<built-in>"
#define __GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
# 0 "<built-in>"
#define __SIZE_TYPE__ long unsigned int
# 0 "<built-in>"
#define __PTRDIFF_TYPE__ long int
# 0 "<built-in>"
#define __WCHAR_TYPE__ int
# 0 "<built-in>"
#define __WINT_TYPE__ unsigned int
# 0 "<built-in>"
#define __INTMAX_TYPE__ long long int
# 0 "<built-in>"
#define __UINTMAX_TYPE__ long long unsigned int
# 0 "<built-in>"
#define __CHAR16_TYPE__ short unsigned int
# 0 "<built-in>"
#define __CHAR32_TYPE__ long unsigned int
# 0 "<built-in>"
#define __SIG_ATOMIC_TYPE__ int
# 0 "<built-in>"
#define __INT8_TYPE__ signed char
# 0 "<built-in>"
#define __INT16_TYPE__ short int
# 0 "<built-in>"
#define __INT32_TYPE__ long int
# 0 "<built-in>"
#define __INT64_TYPE__ long long int
# 0 "<built-in>"
#define __UINT8_TYPE__ unsigned char
# 0 "<built-in>"
#define __UINT16_TYPE__ short unsigned int
# 0 "<built-in>"
#define __UINT32_TYPE__ long unsigned int
# 0 "<built-in>"
#define __UINT64_TYPE__ long long unsigned int
# 0 "<built-in>"
#define __INT_LEAST8_TYPE__ signed char
# 0 "<built-in>"
#define __INT_LEAST16_TYPE__ short int
# 0 "<built-in>"
#define __INT_LEAST32_TYPE__ long int
# 0 "<built-in>"
#define __INT_LEAST64_TYPE__ long long int
# 0 "<built-in>"
#define __UINT_LEAST8_TYPE__ unsigned char
# 0 "<built-in>"
#define __UINT_LEAST16_TYPE__ short unsigned int
# 0 "<built-in>"
#define __UINT_LEAST32_TYPE__ long unsigned int
# 0 "<built-in>"
#define __UINT_LEAST64_TYPE__ long long unsigned int
# 0 "<built-in>"
#define __INT_FAST8_TYPE__ int
# 0 "<built-in>"
#define __INT_FAST16_TYPE__ int
# 0 "<built-in>"
#define __INT_FAST32_TYPE__ int
# 0 "<built-in>"
#define __INT_FAST64_TYPE__ long long int
# 0 "<built-in>"
#define __UINT_FAST8_TYPE__ unsigned int
# 0 "<built-in>"
#define __UINT_FAST16_TYPE__ unsigned int
# 0 "<built-in>"
#define __UINT_FAST32_TYPE__ unsigned int
# 0 "<built-in>"
#define __UINT_FAST64_TYPE__ long long unsigned int
# 0 "<built-in>"
#define __INTPTR_TYPE__ long int
# 0 "<built-in>"
#define __UINTPTR_TYPE__ long unsigned int
# 0 "<built-in>"
#define __GXX_ABI_VERSION 1016
# 0 "<built-in>"
#define __USING_SJLJ_EXCEPTIONS__ 1
# 0 "<built-in>"
#define __SCHAR_MAX__ 0x7f
# 0 "<built-in>"
#define __SHRT_MAX__ 0x7fff
# 0 "<built-in>"
#define __INT_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __LONG_MAX__ 0x7fffffffL
# 0 "<built-in>"
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
# 0 "<built-in>"
#define __WCHAR_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
# 0 "<built-in>"
#define __WINT_MAX__ 0xffffffffU
# 0 "<built-in>"
#define __WINT_MIN__ 0U
# 0 "<built-in>"
#define __PTRDIFF_MAX__ 0x7fffffffL
# 0 "<built-in>"
#define __SIZE_MAX__ 0xffffffffUL
# 0 "<built-in>"
#define __SCHAR_WIDTH__ 8
# 0 "<built-in>"
#define __SHRT_WIDTH__ 16
# 0 "<built-in>"
#define __INT_WIDTH__ 32
# 0 "<built-in>"
#define __LONG_WIDTH__ 32
# 0 "<built-in>"
#define __LONG_LONG_WIDTH__ 64
# 0 "<built-in>"
#define __WCHAR_WIDTH__ 32
# 0 "<built-in>"
#define __WINT_WIDTH__ 32
# 0 "<built-in>"
#define __PTRDIFF_WIDTH__ 32
# 0 "<built-in>"
#define __SIZE_WIDTH__ 32
# 0 "<built-in>"
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
# 0 "<built-in>"
#define __INTMAX_C(c) c ## LL
# 0 "<built-in>"
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
# 0 "<built-in>"
#define __UINTMAX_C(c) c ## ULL
# 0 "<built-in>"
#define __INTMAX_WIDTH__ 64
# 0 "<built-in>"
#define __SIG_ATOMIC_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
# 0 "<built-in>"
#define __SIG_ATOMIC_WIDTH__ 32
# 0 "<built-in>"
#define __INT8_MAX__ 0x7f
# 0 "<built-in>"
#define __INT16_MAX__ 0x7fff
# 0 "<built-in>"
#define __INT32_MAX__ 0x7fffffffL
# 0 "<built-in>"
#define __INT64_MAX__ 0x7fffffffffffffffLL
# 0 "<built-in>"
#define __UINT8_MAX__ 0xff
# 0 "<built-in>"
#define __UINT16_MAX__ 0xffff
# 0 "<built-in>"
#define __UINT32_MAX__ 0xffffffffUL
# 0 "<built-in>"
#define __UINT64_MAX__ 0xffffffffffffffffULL
# 0 "<built-in>"
#define __INT_LEAST8_MAX__ 0x7f
# 0 "<built-in>"
#define __INT8_C(c) c
# 0 "<built-in>"
#define __INT_LEAST8_WIDTH__ 8
# 0 "<built-in>"
#define __INT_LEAST16_MAX__ 0x7fff
# 0 "<built-in>"
#define __INT16_C(c) c
# 0 "<built-in>"
#define __INT_LEAST16_WIDTH__ 16
# 0 "<built-in>"
#define __INT_LEAST32_MAX__ 0x7fffffffL
# 0 "<built-in>"
#define __INT32_C(c) c ## L
# 0 "<built-in>"
#define __INT_LEAST32_WIDTH__ 32
# 0 "<built-in>"
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
# 0 "<built-in>"
#define __INT64_C(c) c ## LL
# 0 "<built-in>"
#define __INT_LEAST64_WIDTH__ 64
# 0 "<built-in>"
#define __UINT_LEAST8_MAX__ 0xff
# 0 "<built-in>"
#define __UINT8_C(c) c
# 0 "<built-in>"
#define __UINT_LEAST16_MAX__ 0xffff
# 0 "<built-in>"
#define __UINT16_C(c) c
# 0 "<built-in>"
#define __UINT_LEAST32_MAX__ 0xffffffffUL
# 0 "<built-in>"
#define __UINT32_C(c) c ## UL
# 0 "<built-in>"
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
# 0 "<built-in>"
#define __UINT64_C(c) c ## ULL
# 0 "<built-in>"
#define __INT_FAST8_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __INT_FAST8_WIDTH__ 32
# 0 "<built-in>"
#define __INT_FAST16_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __INT_FAST16_WIDTH__ 32
# 0 "<built-in>"
#define __INT_FAST32_MAX__ 0x7fffffff
# 0 "<built-in>"
#define __INT_FAST32_WIDTH__ 32
# 0 "<built-in>"
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
# 0 "<built-in>"
#define __INT_FAST64_WIDTH__ 64
# 0 "<built-in>"
#define __UINT_FAST8_MAX__ 0xffffffffU
# 0 "<built-in>"
#define __UINT_FAST16_MAX__ 0xffffffffU
# 0 "<built-in>"
#define __UINT_FAST32_MAX__ 0xffffffffU
# 0 "<built-in>"
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
# 0 "<built-in>"
#define __INTPTR_MAX__ 0x7fffffffL
# 0 "<built-in>"
#define __INTPTR_WIDTH__ 32
# 0 "<built-in>"
#define __UINTPTR_MAX__ 0xffffffffUL
# 0 "<built-in>"
#define __GCC_IEC_559 0
# 0 "<built-in>"
#define __GCC_IEC_559_COMPLEX 0
# 0 "<built-in>"
#define __FLT_EVAL_METHOD__ 0
# 0 "<built-in>"
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
# 0 "<built-in>"
#define __DEC_EVAL_METHOD__ 2
# 0 "<built-in>"
#define __FLT_RADIX__ 2
# 0 "<built-in>"
#define __FLT_MANT_DIG__ 24
# 0 "<built-in>"
#define __FLT_DIG__ 6
# 0 "<built-in>"
#define __FLT_MIN_EXP__ (-125)
# 0 "<built-in>"
#define __FLT_MIN_10_EXP__ (-37)
# 0 "<built-in>"
#define __FLT_MAX_EXP__ 128
# 0 "<built-in>"
#define __FLT_MAX_10_EXP__ 38
# 0 "<built-in>"
#define __FLT_DECIMAL_DIG__ 9
# 0 "<built-in>"
#define __FLT_MAX__ 3.4028234663852886e+38F
# 0 "<built-in>"
#define __FLT_NORM_MAX__ 3.4028234663852886e+38F
# 0 "<built-in>"
#define __FLT_MIN__ 1.1754943508222875e-38F
# 0 "<built-in>"
#define __FLT_EPSILON__ 1.1920928955078125e-7F
# 0 "<built-in>"
#define __FLT_DENORM_MIN__ 1.4012984643248171e-45F
# 0 "<built-in>"
#define __FLT_HAS_DENORM__ 1
# 0 "<built-in>"
#define __FLT_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __FLT_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __FP_FAST_FMAF 1
# 0 "<built-in>"
#define __FLT_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __DBL_MANT_DIG__ 53
# 0 "<built-in>"
#define __DBL_DIG__ 15
# 0 "<built-in>"
#define __DBL_MIN_EXP__ (-1021)
# 0 "<built-in>"
#define __DBL_MIN_10_EXP__ (-307)
# 0 "<built-in>"
#define __DBL_MAX_EXP__ 1024
# 0 "<built-in>"
#define __DBL_MAX_10_EXP__ 308
# 0 "<built-in>"
#define __DBL_DECIMAL_DIG__ 17
# 0 "<built-in>"
#define __DBL_MAX__ ((double)1.7976931348623157e+308L)
# 0 "<built-in>"
#define __DBL_NORM_MAX__ ((double)1.7976931348623157e+308L)
# 0 "<built-in>"
#define __DBL_MIN__ ((double)2.2250738585072014e-308L)
# 0 "<built-in>"
#define __DBL_EPSILON__ ((double)2.2204460492503131e-16L)
# 0 "<built-in>"
#define __DBL_DENORM_MIN__ ((double)4.9406564584124654e-324L)
# 0 "<built-in>"
#define __DBL_HAS_DENORM__ 1
# 0 "<built-in>"
#define __DBL_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __DBL_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __DBL_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __LDBL_MANT_DIG__ 53
# 0 "<built-in>"
#define __LDBL_DIG__ 15
# 0 "<built-in>"
#define __LDBL_MIN_EXP__ (-1021)
# 0 "<built-in>"
#define __LDBL_MIN_10_EXP__ (-307)
# 0 "<built-in>"
#define __LDBL_MAX_EXP__ 1024
# 0 "<built-in>"
#define __LDBL_MAX_10_EXP__ 308
# 0 "<built-in>"
#define __DECIMAL_DIG__ 17
# 0 "<built-in>"
#define __LDBL_DECIMAL_DIG__ 17
# 0 "<built-in>"
#define __LDBL_MAX__ 1.7976931348623157e+308L
# 0 "<built-in>"
#define __LDBL_NORM_MAX__ 1.7976931348623157e+308L
# 0 "<built-in>"
#define __LDBL_MIN__ 2.2250738585072014e-308L
# 0 "<built-in>"
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
# 0 "<built-in>"
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
# 0 "<built-in>"
#define __LDBL_HAS_DENORM__ 1
# 0 "<built-in>"
#define __LDBL_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __LDBL_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __LDBL_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __FLT32_MANT_DIG__ 24
# 0 "<built-in>"
#define __FLT32_DIG__ 6
# 0 "<built-in>"
#define __FLT32_MIN_EXP__ (-125)
# 0 "<built-in>"
#define __FLT32_MIN_10_EXP__ (-37)
# 0 "<built-in>"
#define __FLT32_MAX_EXP__ 128
# 0 "<built-in>"
#define __FLT32_MAX_10_EXP__ 38
# 0 "<built-in>"
#define __FLT32_DECIMAL_DIG__ 9
# 0 "<built-in>"
#define __FLT32_MAX__ 3.4028234663852886e+38F32
# 0 "<built-in>"
#define __FLT32_NORM_MAX__ 3.4028234663852886e+38F32
# 0 "<built-in>"
#define __FLT32_MIN__ 1.1754943508222875e-38F32
# 0 "<built-in>"
#define __FLT32_EPSILON__ 1.1920928955078125e-7F32
# 0 "<built-in>"
#define __FLT32_DENORM_MIN__ 1.4012984643248171e-45F32
# 0 "<built-in>"
#define __FLT32_HAS_DENORM__ 1
# 0 "<built-in>"
#define __FLT32_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __FLT32_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __FP_FAST_FMAF32 1
# 0 "<built-in>"
#define __FLT32_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __FLT64_MANT_DIG__ 53
# 0 "<built-in>"
#define __FLT64_DIG__ 15
# 0 "<built-in>"
#define __FLT64_MIN_EXP__ (-1021)
# 0 "<built-in>"
#define __FLT64_MIN_10_EXP__ (-307)
# 0 "<built-in>"
#define __FLT64_MAX_EXP__ 1024
# 0 "<built-in>"
#define __FLT64_MAX_10_EXP__ 308
# 0 "<built-in>"
#define __FLT64_DECIMAL_DIG__ 17
# 0 "<built-in>"
#define __FLT64_MAX__ 1.7976931348623157e+308F64
# 0 "<built-in>"
#define __FLT64_NORM_MAX__ 1.7976931348623157e+308F64
# 0 "<built-in>"
#define __FLT64_MIN__ 2.2250738585072014e-308F64
# 0 "<built-in>"
#define __FLT64_EPSILON__ 2.2204460492503131e-16F64
# 0 "<built-in>"
#define __FLT64_DENORM_MIN__ 4.9406564584124654e-324F64
# 0 "<built-in>"
#define __FLT64_HAS_DENORM__ 1
# 0 "<built-in>"
#define __FLT64_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __FLT64_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __FLT64_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __FLT32X_MANT_DIG__ 53
# 0 "<built-in>"
#define __FLT32X_DIG__ 15
# 0 "<built-in>"
#define __FLT32X_MIN_EXP__ (-1021)
# 0 "<built-in>"
#define __FLT32X_MIN_10_EXP__ (-307)
# 0 "<built-in>"
#define __FLT32X_MAX_EXP__ 1024
# 0 "<built-in>"
#define __FLT32X_MAX_10_EXP__ 308
# 0 "<built-in>"
#define __FLT32X_DECIMAL_DIG__ 17
# 0 "<built-in>"
#define __FLT32X_MAX__ 1.7976931348623157e+308F32x
# 0 "<built-in>"
#define __FLT32X_NORM_MAX__ 1.7976931348623157e+308F32x
# 0 "<built-in>"
#define __FLT32X_MIN__ 2.2250738585072014e-308F32x
# 0 "<built-in>"
#define __FLT32X_EPSILON__ 2.2204460492503131e-16F32x
# 0 "<built-in>"
#define __FLT32X_DENORM_MIN__ 4.9406564584124654e-324F32x
# 0 "<built-in>"
#define __FLT32X_HAS_DENORM__ 1
# 0 "<built-in>"
#define __FLT32X_HAS_INFINITY__ 1
# 0 "<built-in>"
#define __FLT32X_HAS_QUIET_NAN__ 1
# 0 "<built-in>"
#define __FLT32X_IS_IEC_60559__ 2
# 0 "<built-in>"
#define __REGISTER_PREFIX__ %
# 0 "<built-in>"
#define __USER_LABEL_PREFIX__ 
# 0 "<built-in>"
#define __GNUC_STDC_INLINE__ 1
# 0 "<built-in>"
#define __GCC_ATOMIC_BOOL_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_CHAR_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_SHORT_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_INT_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_LONG_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
# 0 "<built-in>"
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
# 0 "<built-in>"
#define __GCC_ATOMIC_POINTER_LOCK_FREE 1
# 0 "<built-in>"
#define __HAVE_SPECULATION_SAFE_VALUE 1
# 0 "<built-in>"
#define __PRAGMA_REDEFINE_EXTNAME 1
# 0 "<built-in>"
#define __SIZEOF_WCHAR_T__ 4
# 0 "<built-in>"
#define __SIZEOF_WINT_T__ 4
# 0 "<built-in>"
#define __SIZEOF_PTRDIFF_T__ 4
# 0 "<built-in>"
#define __tricore 1
# 0 "<built-in>"
#define __tricore__ 1
# 0 "<built-in>"
#define tricore 1
# 0 "<built-in>"
#define __TRICORE__ 1
# 0 "<built-in>"
#define __TC162__ 1
# 0 "<built-in>"
#define __TRICORE_CORE__ 0x162
# 0 "<built-in>"
#define __TC33XX__ 1
# 0 "<built-in>"
#define __TRICORE_NAME__ 0x3300
# 0 "<built-in>"
#define __TRICORE_HAVE_DIV__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_FTOIZ__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_MOV64__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_POPCNT__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_LHA__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_CRCN__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_SHUFFLE__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_FTOHP__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_HPTOF__ 1
# 0 "<built-in>"
#define __TRICORE_HAVE_FLOAT16__ 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_NOP 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_LROTATE 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_RROTATE 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_INSERT 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_IMASK 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SWAPW 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SWAPMSKW 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_CMPSWAPW 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SATB 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SATH 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SATBU 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_SATHU 1
# 0 "<built-in>"
#define __BUILTIN_TRICORE_LDMST 1
# 0 "<built-in>"
#define __ELF__ 1
# 0 "<command-line>"
# 1 "flash_TC4xx.c"





#define flashaddress parameter[0]
#define databuswidth parameter[1]
#define address parameter[2]
#define number parameter[3]
#define status parameter[4]
#define databegin parameter[5]
#define dummy1 parameter[6]
#define dummy2 parameter[7]
#define HCI_STATUS 0xF8040004u
#define HCI_CLRERR 0xF8040014u
#define HCI_ERR 0xF8040010u
#define DMU_GP_HOST_DFECCS 0xF804010Cu
#define DMU_GP_HOST_DFECCC 0xF8040110u


#define MEM(address) (*((volatile unsigned int *)(address)))


#define MEM16(address) (*((volatile unsigned short *)(address)))


#define MEM8(address) (*((volatile unsigned char *)(address)))


#define PFRWBxy_UR_FLASHCON2_OFFS 0x0u
#define PFRWBxy_UR_FLASHCON3_OFFS 0x4u
#define PFRWBxy_UR_ECCR_OFFS 0x2000u
#define PFRWBxy_UR_ECCS_OFFS 0x2004u

void
start (void)
{
  __asm (".global _start");
  __asm (" _start:	 nop");
  __asm (" nop");
  __asm (" movh.a   %a10,hi:(0x70004000)");
  __asm (" lea      %a10,[%a10]lo:(0x70004000)");
  __asm (" ja flashing");
}

int
flashing (unsigned long *parameter, char **notused)
{
  volatile int timeout;
  volatile unsigned int i, j, len;
  volatile unsigned int addr_aligned;
  volatile unsigned int *data, read;
  volatile unsigned int low32bit, high32bit;
  volatile unsigned int burst;
  volatile unsigned int burst_buffer[0x80];


  (*((volatile unsigned int *)(0xF8040014u))) = 0xff;
  if ((*((volatile unsigned int *)(&parameter[4]))) == 1)
    {
      (*((volatile unsigned int *)(&parameter[4]))) = 0x100;
      addr_aligned = (unsigned int) parameter[2];
      data = (unsigned int*) parameter[5];
      burst = 0x0;
      if ((parameter[0]& 0x88000000)==0x80000000) burst=0x80;
      if ((parameter[0]& 0x88000000)==0x88000000) burst=0x8;
      if (burst == 0x0)
 {
   (*((volatile unsigned int *)(&parameter[4]))) = 0x100;
   __asm ("	debug");
 }
      while (parameter[3]> 0)
 {
   for (i=0; i<burst; i++)
     {
       burst_buffer[i]=*data;
       data++;
       parameter[3]-=4;
     }
   if (burst==0x80)
     { (*((volatile unsigned int *)(0xF8085554))) = 0x50;}
   if (burst==0x8)
     { (*((volatile unsigned int *)(0xF8085554))) = 0x5D;}
   i=0;
   while (i<burst)
     {
       low32bit=burst_buffer[i];
       i+=1;
       high32bit=burst_buffer[i];
       i+=1;
       (*((volatile unsigned int *)(0xF80855F4)))=low32bit;
       __asm ("	dsync");
       (*((volatile unsigned int *)(0xF80855F4)))=high32bit;
       __asm ("	dsync");
     }

   (*((volatile unsigned int *)(0xF808AA50))) = addr_aligned;
   __asm ("	dsync");
   (*((volatile unsigned int *)(0xF808AA58))) = 0x0;
   __asm ("	dsync");
   (*((volatile unsigned int *)(0xF808AAA8))) = 0xa0;
   __asm ("	dsync");
   (*((volatile unsigned int *)(0xF808AAA8))) = 0xa6;
   __asm ("	dsync");

   for (timeout=0x4000; timeout>0; timeout--)
     {
       read = (*((volatile unsigned int *)(0xF8040004u)));
       __asm ("	dsync");
       if ((read & 0x007FFFF) ==0)
  { timeout=0; (*((volatile unsigned int *)(0xF8085554))) = 0xFA;}
       if (timeout==1)
  {
    parameter[2] = addr_aligned; (*((volatile unsigned int *)(&parameter[4]))) = 0x0100; (*((volatile unsigned int *)(0xF8085554))) = 0xFA; __asm ("	debug");
  }
     }
   addr_aligned+=burst*4;
 }
      if (((*((volatile unsigned int *)(0xF8040010u))) & 0x0010FF) != 0)
 (*((volatile unsigned int *)(&parameter[4]))) = 0x0100;
      else
 (*((volatile unsigned int *)(&parameter[4]))) = 0x0;
      (*((volatile unsigned int *)(0xF8085554))) = 0xFA;
      __asm ("	debug");
    }



  if ((*((volatile unsigned int *)(&parameter[4]))) == 2)
    {
      (*((volatile unsigned int *)(&parameter[4]))) = 0x100;
      (*((volatile unsigned int *)(0xF808AA50))) = parameter[2];
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AA58))) = parameter[3];
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AAA8))) = 0x80;
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AAA8))) = 0x50;
      __asm ("	dsync");
      while (1 == 1)
 {
   for (i = 0; i < 0x4000; i++)
     {
       i += 1;
       i -= 1;
     }
   read = (*((volatile unsigned int *)(0xF8040004u)));
   __asm ("	dsync");
   if ((read & 0x007FFFF) == 0)
     {
       if (((*((volatile unsigned int *)(0xF8040010u))) & 0x0010FF) != 0)
  (*((volatile unsigned int *)(&parameter[4]))) = 0x0100;
       else
  (*((volatile unsigned int *)(&parameter[4]))) = 0x0;
       __asm ("	debug");

     }
 }
      (*((volatile unsigned int *)(&parameter[4]))) = 0x0;
      __asm ("	debug");
    }


  if ((*((volatile unsigned int *)(&parameter[4]))) == 3)
    {
# 199 "flash_TC4xx.c"
      (*((volatile unsigned int *)(&parameter[4]))) = 0x100;
      (*((volatile unsigned int *)(0xF808AA50))) = parameter[2];
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AA58))) = 1;
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AAA8))) = 0x80;
      __asm ("	dsync");
      (*((volatile unsigned int *)(0xF808AAA8))) = 0x50;
      __asm ("	dsync");
      while (1 == 1)
 {
   for (i = 0; i < 0x40000; i++)
     {
       i += 1;
       i -= 1;
     }
   read = (*((volatile unsigned int *)(0xF8040004u)));
   __asm ("	dsync");
   if ((read & 0x007FFFF) == 0)
     {
       if (((*((volatile unsigned int *)(0xF8040010u))) & 0x0010FF) != 0)
  {
    (*((volatile unsigned int *)(&parameter[4]))) = 0x0101;
    __asm ("	debug");
  }
       else
  {
    (*((volatile unsigned int *)(&parameter[4]))) = 0x0;
    goto program_copy;
  }

     }
 }
program_copy: len = 0x800 >> 2;
      burst = 0x8;
      data = (unsigned int*) (parameter[5]);
      j = 0;
      while (j < len)
 {
   i = 0;
   (*((volatile unsigned int *)(0xF8085554))) = 0x5D;
   while (i < burst)
     {
       low32bit = data[j + i];
       (*((volatile unsigned int *)(0xF80855F4))) = low32bit;
       __asm ("	dsync");
       i += 1;
       high32bit = data[j + i];
       (*((volatile unsigned int *)(0xF80855F4))) = high32bit;
       __asm ("	dsync");
       i += 1;
     }
   (*((volatile unsigned int *)(0xF808AA50))) = parameter[2]+ (j<<2);
   __asm ("	dsync");
   (*((volatile unsigned int *)(0xF808AA58))) = 0x0;
   __asm ("	dsync");
   (*((volatile unsigned int *)(0xF808AAA8))) = 0xa0;

   (*((volatile unsigned int *)(0xF808AAA8))) = 0xa6;
   __asm ("	dsync");
   for (timeout = 0x4000; timeout > 0; timeout--)
     {
       read = (*((volatile unsigned int *)(0xF8040004u)));
       __asm ("	dsync");
       if ((read & 0x007FFFF) == 0)
  {
    timeout = 0;
    (*((volatile unsigned int *)(0xF8085554))) = 0xFA;
  }
       if (timeout == 1)
  {
    parameter[2]= addr_aligned;
    (*((volatile unsigned int *)(&parameter[4]))) = 0x0102;
    (*((volatile unsigned int *)(0xF8085554))) = 0xFA;
    __asm ("	debug");
  }
     }
   j += burst;
   if (((*((volatile unsigned int *)(0xF8040010u))) & 0x0010FF) != 0)
     {
       (*((volatile unsigned int *)(&parameter[4]))) = 0x0103;
       __asm ("	debug");
     }
 }
      (*((volatile unsigned int *)(&parameter[4]))) = 0x0;
      __asm ("	debug");

    }


  if ((*((volatile unsigned int *)(&parameter[4]))) == 4)
    {
      parameter[4]=0x100;
      data = (unsigned int *) (parameter[5]);
      while (data[0]!=0xFFFFFFFF)
 {
   unsigned int *addr_begin;
   unsigned int len_verify;
   volatile unsigned int checksum;
   volatile unsigned int tmp1,tmp2;
   unsigned int ii=0;
   checksum=0;
   addr_begin=(unsigned int *) data[0];
   len_verify=data[1];
   if (data[5]!=0)
     {
       (*((volatile unsigned int *)(data[5]+0x0u)))=(*((volatile unsigned int *)(data[5]+0x0u))) | 0x55000000;
       __asm ("	dsync");
       (*((volatile unsigned int *)(data[5]+0x0u)))=(*((volatile unsigned int *)(data[5]+0x0u))) | 0x400;
       __asm ("	dsync");
     }
   else
     {

       (*((volatile unsigned int *)(0xF8040110u)))=0xC0000003;
       __asm ("	dsync");
     }
   if (data[6]==*addr_begin)
     {
       while (ii<len_verify)
  {
    checksum+=*addr_begin;
    addr_begin++;
    ii+=4;
  }
       if (checksum==data[2]) data[3]=0xAAAAAAAA;
       else data[3]=0xEEEEEEEE;
     }
   else
     {
       data[3]=0xEEEEEEEE;
     }
   if (data[5]!=0)
     {
       tmp1=(*((volatile unsigned int *)(data[5]+0x2004u)));
       if ((tmp1 & ~0x80008)!=0) data[3]=0xEEEEEEEE;
       (*((volatile unsigned int *)(data[5]+0x0u)))=(*((volatile unsigned int *)(data[5]+0x0u))) | 0x55000000;
       __asm ("	dsync");
       (*((volatile unsigned int *)(data[5]+0x0u)))=(*((volatile unsigned int *)(data[5]+0x0u))) | ~0x400;
       __asm ("	dsync");
       tmp2=(*((volatile unsigned int *)(data[5]+0x2004u)));
       data[6]=tmp1;
       data[7]=tmp2;
     }
   else
     {
       tmp1=(*((volatile unsigned int *)(0xF804010Cu)));
       if ((tmp1 & ~0x80008)!=0) data[3]=0xEEEEEEEE;
       (*((volatile unsigned int *)(0xF8040110u)))=0xC0000003;
       __asm ("	dsync");
       (*((volatile unsigned int *)(0xF8040110u)))=0xC0000000;
       __asm ("	dsync");
       tmp2=(*((volatile unsigned int *)(0xF804010Cu)));
       data[6]=tmp1;
       data[7]=tmp2;
     }
   data+=8;
 }
      (*((volatile unsigned int *)(&parameter[4])))=0x0;
      __asm ("	debug");
    }

  (*((volatile unsigned int *)(&parameter[4]))) = 0x100;
  __asm ("	debug");
  return 0;
}
